<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.util.*,javax.naming.*,java.sql.*,javax.sql.*" %>
<%@ page import="com.simple.util.common.*" %>
<%@ include file="../include/head.jspf"%>
<c:set var="rowNo" value="1"/>
<html>
<head>
<title>东方易云后台管理系统</title>
<style>
body { background: #f5f5f5 ;}
</style>
<script type="text/javascript" src="resource/js/DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
function addSelect(){
	document.selectForm.action="addFlowTemplate";
	document.selectForm.submit();
}
function goPage(pageNo) {
	document.goPageForm.pageNo.value = pageNo;
	document.goPageForm.submit();
}
function delSelect(flowTemplateId){
	if(confirm("请确定需要删除")){
		document.selectForm.action="delFlowTemplate";
		$("#flowTemplateId").val(flowTemplateId);
		document.selectForm.submit();
	}
}
function uptSelect(flowTemplateId){
	document.selectForm.action="uptBusinessFlow";
	$("#flowTemplateId").val(flowTemplateId);
	document.selectForm.submit();
}

function viewSelect(flowTemplateId){
	document.selectForm.action="viewBusinessFlow";
	$("#flowTemplateId").val(flowTemplateId);
	document.selectForm.submit();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

<div id="body-wrapper">
  <!-- Wrapper for the radial gradient background -->
  <div id="main-content">
  
    <!-- Main Content Section with everything -->
    <!-- Page Head -->
    <div id="page-title"><h3>业务流程模板查询</h3></div>
    <div class="pgline"></div>
    <div class="notification querytj png_bg">
      <div>
      	<form  action="businessFlow" id="selectForm" name="selectForm" method="post">
      	<input type="hidden" id="flowTemplateId" name="flowTemplateId" value="">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="13%" height="35" align="right">&nbsp;&nbsp;模板名称：              </td>
            <td width="29%"><input type="text" name="flowTemplateNameSelect" id="flowTemplateNameSelect" class="input2" value="<c:out value="${flowTemplateNameSelect}"/>" /></td>
            <td width="15%" align="right">模板编号：              </td>
            <td width="29%"><input type="text" name="flowTemplateIdSelect" id="flowTemplateIdSelect" class="input2" value="<c:out value="${flowTemplateIdSelect}"/>" /></td>
            <td width="14%" rowspan="3"><div><a class="button" href="#" onclick="$('#selectForm').submit();">查询</a></div></td>
          </tr>
          <tr>
            <td height="35" align="right">&nbsp;&nbsp;业务类型：              </td>
            <td height="35">
            <select name="businessTypeSelect" id="businessTypeSelect" class="select1" >
            	<option value="">-</option>
	            <c:forEach items="${optionOperationTypeMap}" var="one">
	              <option value="<c:out value="${one.key}"></c:out>" <c:out value="${businessTypeSelect== one.key?'Selected':''}"></c:out>><c:out value="${one.value}"/></option>
	            </c:forEach>
            </select>
             <td width="15%" align="right">模板状态：              </td>
            <td width="26%">
			<select name="statusSelect" id="statusSelect" class="select1" >
				<option value="">-</option>
	            <c:forEach items="${optionTemplateStatusMap}" var="one">
	              <option value="<c:out value="${one.key}"></c:out>" <c:out value="${statusSelect== one.key?'Selected':''}"></c:out>><c:out value="${one.value}"/></option>
	            </c:forEach>
            </select>
			</td>
          </tr>
          <tr>
            <td height="35" align="right">&nbsp;&nbsp;创建人：              </td>
            <td width="29%"><input type="text" name="createrSelect" id="createrSelect" class="input2" value="<c:out value="${createrSelect}"/>" /></td>
          </tr>
          <tr>
          </td>
            <td height="35" align="right">创建日期：              </td>
            <td height="35" colspan="3">
			<input type="text" id="creatTimeStart" name="creatTimeStart" class="Wdate input2" value="<c:out value='${creatTimeStart}' />" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="12"/>
            &nbsp;至&nbsp;
            <input type="text" id="creatTimeEnd" name="creatTimeEnd" class="Wdate input2" value="<c:out value='${creatTimeEnd}' />" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" size="14"/>
			</td>
          </tr>
        </table>
        </form>
      </div>
    </div>
    
    <div class="clear"></div>
     <div class="bulk-actions align-left"> <a class="button2" href="javascript:void(0)" onclick="addSelect();">新建</a> </div>
    <div class="clear"></div>
    
    <div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>接收通道列表</h3>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content default-tab">
          <table>
            <thead>
              <tr>
                <th>序号</th>
                <th>模板名称</th>
                <th>模板编号</th>
                <th>业务类型</th>
                <th>创建人</th>
                <th>创建日期</th>
                <th>状态</th>
                <th>模板备注</th>
                <th>操作</th>
              </tr>
            </thead>
            <tfoot>
              <tr>
                <td colspan="9">
                 <c:out value="${pageInfo}" escapeXml="false"></c:out>
                  <!-- End .pagination -->
                  <div class="clear"></div></td>
              </tr>
            </tfoot>
            <tbody>
              <c:forEach var="dataxFlowTemplateVO" items="${dataxFlowTemplateVOList}" varStatus="c" >
              <tr>
                <td><c:out value="${(pageNo-1)*8+c.count}"></c:out></td>
                <td><c:out value="${dataxFlowTemplateVO.flowTemplateName}"></c:out></td>
                <td><a href="javascript:void(0)" onclick="viewSelect('<c:out value="${dataxFlowTemplateVO.flowTemplateId}" />');" ><c:out value="${dataxFlowTemplateVO.flowTemplateId}"></c:out></a></td>
                <td><c:out value="${optionOperationTypeMap[dataxFlowTemplateVO.businessType]}"></c:out></td>
                <td><c:out value="${dataxFlowTemplateVO.creater}"></c:out></td>
                <td><fmt:formatDate value="${dataxFlowTemplateVO.creatTime}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
                <td><c:out value="${optionTemplateStatusMap[fn:trim(dataxFlowTemplateVO.status)]}"></c:out></td>
                <td><c:out value="${dataxFlowTemplateVO.notes}"></c:out></td>
                <td>
                <c:if test="${dataxFlowTemplateVO.status == '1'}">
                <a href="javascript:void(0)" onclick="uptSelect('<c:out value="${dataxFlowTemplateVO.flowTemplateId}" />');"  >编辑</a>
                </c:if>
                <a href="javascript:void(0)" onclick="delSelect('<c:out value="${dataxFlowTemplateVO.flowTemplateId}" />');"   >删除</a></td>
              </tr>
             </c:forEach>
            </tbody>
          </table>
        </div>
        <!-- End #tab1 -->
      </div>
      <!-- End .content-box-content -->
    </div>
  </div>
  <!-- End #main-content -->
</div>
<form method="post" action="businessFlow" id="goPageForm" name="goPageForm">
      <input type="hidden" id="pageNo" name="pageNo" value="<c:out value='${pageNo}'/>" />
      <input type="hidden" id="templateNameSelect" name="templateNameSelect" value="<c:out value='${templateNameSelect}' />">
      <input type="hidden" id="templateIdSelect" name="templateIdSelect" value="<c:out value='${templateIdSelect}' />">
      <input type="hidden" id="businessTypeSelect" name="businessTypeSelect" value="<c:out value='${businessTypeSelect}' />">
      <input type="hidden" id="createrSelect" name="createrSelect" value="<c:out value='${createrSelect}' />">
      <input type="hidden" id="creatTimeStart" name="creatTimeStart" value="<c:out value='${creatTimeStart}' />">
      <input type="hidden" id="creatTimeEnd" name="creatTimeEnd" value="<c:out value='${creatTimeEnd }' />">
      <input type="hidden" id="statusSelect" name="statusSelect" value="<c:out value='${statusSelect}' />">
</form>
</body> 
</html>